.PHONY: all clean run
all: stlShape VectorCoreDump VectorInsertErase VectorOverflow 

stlShape: stlShape.cpp
	g++ -o stlShape stlShape.cpp

VectorCoreDump: VectorCoreDump.cpp
	g++ -o VectorCoreDump VectorCoreDump.cpp

VectorInsertErase: Noisy.o VectorInsertErase.o
	g++ -o VectorInsertErase Noisy.o VectorInsertErase.o 
	
VectorOverflow: Noisy.o VectorOverflow.o
	g++ -o VectorOverflow Noisy.o VectorOverflow.o
	
Noisy.o: Noisy.h

VectorOverflow.o: Noisy.h
	g++ -c -o VectorOverflow.o VectorOverflow.cpp

VectorInsertErase.o: Noisy.h
	g++ -c -o VectorInsertErase.o VectorInsertErase.cpp

clean:
	rm -f stlShape *.o VectorOverflow result VectorCoreDump VectorInsertErase
	
run:
	@echo "---------run stlShape----------";
	@./stlShape
	
	@echo "---------run VectorCoreDump----------";
	@./VectorCoreDump
	
	@echo "---------run VectorInsertErase-------";
	@./VectorInsertErase

	@echo "---------run VectorOverflow---------";
	@./VectorOverflow > result
	@more result
